package org.bee.input;

import org.bee.check.Enums;
import org.bee.check.Length;
import org.bee.check.NotNull;
import org.bee.check.Regex;
import org.bee.enums.Gender;
import org.bee.model.BaseModel;

public class UserInsertVo implements BaseModel {
    /**
     * 用户名
     */
    @NotNull
    @Length(min = 5,max = 16,msg="用户名长度为5-16位")
    @Regex(value = "[a-z]+",msg = "用户名必须是小写的英文")
    private String username;
    /**
     * 昵称
     */
    @NotNull
    @Length(min = 2,max = 16,msg="昵称长度为2-16位")
    private String nickname;
    /**
     * 头像
     */
    @NotNull
    @Length(min = 0,max = 255,msg="头像链接长度最长为255")
    @Regex(value = "https?://[^\\s]*\\.(?:jpg|jpeg|png|gif)$",msg = "头像必须是图片链接")
    private String avatar;
    /**
     * 密码
     */
    @NotNull
    @Length(min = 6,max = 16,msg="密码长度为6-16位")
    @Regex(value = "^(?=.*[a-z])(?=.*[A-Z])(?=.*[!@#$%^&*()\\-_=+{};:,<.>]).+$",msg = "密码必须包含特殊字符以及大小写字母")
    private String password;
    /**
     * 性别
     */
    @NotNull
    @Enums(value = Gender.class)
    private Boolean gender;
    /**
     * 手机号
     */
    @Regex(value = "^1[3-9]\\d{9}$", msg = "手机号格式不正确")
    private String phone;
    /**
     * 部门id
     */
    @NotNull
    private String departmentId;
    /**
     * 角色id
     */
    @NotNull
    private String roleId;
    /**
     * 备注
     */
    @Length(min = 0,max = 255,msg="备注长度最长为255")
    private String remark;

    /**
     * 用户类型 0-系统管理员 1-普通用户
     */
    private Integer type;

    public String getUsername() {
        return username;
    }

    public void setUsername(String username) {
        this.username = username;
    }

    public String getNickname() {
        return nickname;
    }

    public void setNickname(String nickname) {
        this.nickname = nickname;
    }

    public String getAvatar() {
        return avatar;
    }

    public void setAvatar(String avatar) {
        this.avatar = avatar;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    public Boolean getGender() {
        return gender;
    }

    public void setGender(Boolean gender) {
        this.gender = gender;
    }

    public String getPhone() {
        return phone;
    }

    public void setPhone(String phone) {
        this.phone = phone;
    }

    public String getDepartmentId() {
        return departmentId;
    }

    public void setDepartmentId(String departmentId) {
        this.departmentId = departmentId;
    }

    public String getRoleId() {
        return roleId;
    }

    public void setRoleId(String roleId) {
        this.roleId = roleId;
    }

    public String getRemark() {
        return remark;
    }

    public void setRemark(String remark) {
        this.remark = remark;
    }

    public Integer getType() {
        return type;
    }

    public void setType(Integer type) {
        this.type = type;
    }
}
